]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
lockScreen: Extend modal grab to entire uiGroup
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 13 May 2022 12:30:00 +0000 (14:30 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 18 May 2022 18:16:10 +0000 (20:16 +0200)
Main.pushModal() used to ensure a compositor grab, but didn't
take an input grab. That changed when porting to ClutterGrab,
so by limiting the grab to the shield/dialog, it is no longer
possible to access top bar menus when the screen is locked.

To fix that, take the grab on the whole uiGroup so that the top
bar is included.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5470

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2298>

js/ui/screenShield.js
js/ui/unlockDialog.js

index a78172047e499478f3d19d5b825de03520eb1f4b..be6a72190e73d5eb90d0a4ea0d11850227ee2d51 100644 (file)
@@ -196,7 +196,7 @@ var ScreenShield = class {
         if (this._isModal)
             return true;
 
-        let grab = Main.pushModal(this.actor, { actionMode: Shell.ActionMode.LOCK_SCREEN });
+        let grab = Main.pushModal(Main.uiGroup, { actionMode: Shell.ActionMode.LOCK_SCREEN });
 
         // We expect at least a keyboard grab here
         this._isModal = (grab.get_seat_state() & Clutter.GrabState.KEYBOARD) !== 0;
index bf81343b909937fa0dad512551552d8faee9a371..24c81609c13928d071d9a617538badf49b55bca3 100644 (file)
@@ -873,7 +873,7 @@ var UnlockDialog = GObject.registerClass({
             timestamp,
             actionMode: Shell.ActionMode.UNLOCK_SCREEN,
         };
-        let grab = Main.pushModal(this, modalParams);
+        let grab = Main.pushModal(Main.uiGroup, modalParams);
         if (grab.get_seat_state() !== Clutter.GrabState.ALL) {
             Main.popModal(grab);
             return false;